/*
package com.jiazhong.servlet.controller;

import com.jiazhong.commons.bean.Emp;
import com.jiazhong.commons.util.JsonResult;
import com.jiazhong.servlet.service.EmpService;
import com.jiazhong.servlet.service.impl.EmpServiceImpl;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@WebServlet("/emp_find_id")
public class EmpFindByIdController extends HttpServlet {

    private EmpService empService;

    @Override
    public void init(ServletConfig config) throws ServletException {
        empService = new EmpServiceImpl();
    }

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        int empNo = Integer.parseInt(request.getParameter("empNo"));
        JsonResult emp = empService.findById(empNo);
        response.setContentType("application/json;charset=UTF-8");
        PrintWriter out = response.getWriter();
        out.print(emp);
    }
}
*/
